<?php
class News extends Controller
{
	function __construct()
	{
		parent::Controller();
		$this->load->model('news_model')	;
	}	
	function index()
	{
		$this->detail();
	}
	function detail()
	{
		$data['title']="TIN TỨC";
		$data['url']="news/news";
		$id_category=(int)$this->uri->segment(3);
		$name=$this->news_model->get_name_category($id_category);
		$data['name_category']=$name[0];	
		$data['new']=$this->news_model->get_news_field($id_category);	
		$data['detail_news']=$this->news_model->get_short_news_field($id_category);
		$this->load->view('html/views',$data);
	}
}
?>